ARG FROM_PLATFORM
ARG IMAGE_BASIC_KAFKA_VERSION
FROM --platform=${FROM_PLATFORM} sparrow-basic-kafka:${IMAGE_BASIC_KAFKA_VERSION}

ARG DOCKER_HOST_IP
ARG ZOOKEEPER_PORT
ARG KAFKA_CONTAINER_PORT
ENV KAFKA_BROKER_ID=0 \
    KAFKA_ZOOKEEPER_CONNECT=${DOCKER_HOST_IP}:${ZOOKEEPER_PORT} \
    KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://${DOCKER_HOST_IP}:${KAFKA_CONTAINER_PORT} \
    KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:${KAFKA_CONTAINER_PORT}

ARG IMAGE_BASIC_KAFKA_VERSION
WORKDIR /opt/kafka_${IMAGE_BASIC_KAFKA_VERSION}/bin/
